package com.lwj.dao;

import com.lwj.entity.Team;
import com.lwj.entity.User;
import com.lwj.model.TeamRes;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

public interface TeamMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Team record);

    int insertSelective(Team record);

    Team selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Team record);

    int updateByPrimaryKey(Team record);

    /**
     * 指定用户的团队信息
     * @param user
     * @return
     */
    List<TeamRes> getTeam(User user);

    /**
     * 获取当前用户为队长的团队信息
     * @param user
     * @return
     */
    List<Team> getUserLeaderTeam(User user);

    /**
     * 获取项目投标队伍信息
     * @param projectId
     * @return
     */
    List<Team> getCompeteTeam(int projectId);

}